﻿<%@ Page Language="C#" MasterPageFile="~/Masterlayout.master" AutoEventWireup="true" CodeFile="Categories.aspx.cs" Inherits="Categories" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<title>CATEGORIES Pages</title>
    <style>
    .stylebtn
      {
      	border-width:1px;
      	height: 35px;
      	width:100px;
      }
    .tb5 {
	        border:2px solid #456879;
	        border-radius:10px;
	        height: 22px;
	        width: 230px;
             margin-left: 0px;
            
          }
    .gv
        {
        	border:2px solid #456879;
	        border-radius:20px;
	        width:742px;
	
        }
        .style1
        {
            height: 29px;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <center>
        <table width = "660px">
        <tr align="left">
            <td width = "120px" >
                Category ID:
            </td>
            <td>
                <asp:TextBox ID="txtCategoryID" runat="server" ReadOnly="true" class="tb5"></asp:TextBox>
            </td>
        </tr>
        
        <tr align="left">
            <td>
                Category Name:
            </td>
            <td>
                <asp:TextBox ID="txtCategoryName" runat="server" class="tb5"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ErrorMessage="Enter Category Name" ControlToValidate="txtCategoryName">
                    </asp:RequiredFieldValidator>
            </td>
        </tr>
        
        <tr align="left">
            <td class="style1">
                Decription:
            </td>
            <td class="style1">
                <asp:TextBox ID="txtDescription" runat="server" class="tb5"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txtDescription" ErrorMessage="Enter Decription"></asp:RequiredFieldValidator>
            </td>
        </tr>
        
       <tr align="left">
            <td colspan = "5">
                <asp:Button ID="btnInsert" runat="server" Text="Insert" Width="115px" 
                    OnClick="btnInsert_Click" class="tb5" />&nbsp;
                <asp:Button ID="btnUpdate" runat="server" Text="Update" Width="115px" 
                    OnClick="btnUpdate_Click" class="tb5"/>&nbsp;
                <asp:Button ID="btnSearch" runat="server" Text="Search by Name" Width = "120px" 
                    onclick="btnSearch_Click" class="tb5" CausesValidation="False"/>
                <asp:Button ID="btnDelete" runat="server" Text="Delete" Width="115px" 
                    OnClick="btnDelete_Click"  class="tb5" CausesValidation="False"/>&nbsp;
                &nbsp;
                <asp:Button ID="btnClearProduct" runat="server" Text="Clear" Width="90px" 
                    OnClick="btnClearProduct_Click" class="tb5" CausesValidation="False"/>&nbsp;
                <asp:Button ID="btnLoadCategory" runat="server" onclick="btnLoadCategory_Click" 
                    Text="LoadCategory" class="tb5" Width="115px" CausesValidation="False"/>
            </td>
        </tr>
        
        <tr align="left">
            <td colspan = "5" class="style1">
                <asp:TextBox ID="txtSearch" runat="server" class="tb5"></asp:TextBox>&nbsp;
                &nbsp;
            </td>
        </tr>
    </table>
    </center>
            
    <br />
    <center >
        <asp:GridView ID="GridViewCategory" runat="server" 
        class="tb5"
        BackColor="White"
        ForeColor="Black"
            AllowPaging="True"
            PageSize="10" 
            CellPadding="5" 
            GridLines="None"
            AutoGenerateSelectButton="True" 
            onselectedindexchanged="GridViewCategory_SelectedIndexChanged" 
            onselectedindexchanging="GridViewCategory_SelectedIndexChanging" 
            Width="677px">
            
           <HeaderStyle BackColor="Orange" />
        <EditRowStyle ForeColor="Black" />
        <AlternatingRowStyle BackColor="DarkGray" />
        <SelectedRowStyle BackColor="BlueViolet" />
        </asp:GridView>
    </center>
</asp:Content>

